% function x = fun(f,x0,x1,e)
%     if nargin < 4 
%         e = 10^(-6);
%     end
%     x = x1 + 2*e;
%     while abs(x - x1) > e
%         x0 = x1;x1 = x;
%         x = x1 - (x1 - x0)/(f(x1) - f(x0)) * f(x1);
%     end
% end
function [r] = fun(mode)

    % o = 0:0.01:pi/2;
    % x = 2 * cos(o);
    % y = 3 * sin(o);
    % d = gradient(y,x);
    % for i  = 1 : length(x)
    %     [~,id] = min(abs(x(i) - mode));
    % end
    % r = sqrt(1 + d(id)^2);
    r = 3;
end